package com.sodimac.util.alerts
{
	import mx.controls.Alert;
	
	public class alert extends Alert
	{
		[Embed(source="com/sodimac/v2s/assets/images/alert_error.gif")]
		private static var iconError:Class;
		
		[Embed(source="com/sodimac/v2s/assets/images/alert_info.gif")]
		private static var iconInfo:Class;
		
		[Embed(source="com/sodimac/v2s/assets/images/alert_question.gif")]
		private static var iconConfirm:Class;

		[Embed(source="com/sodimac/v2s/assets/images/alert_warning.gif")]
		private static var iconWarning:Class;

		[Embed(source="com/sodimac/v2s/assets/images/alert_success.png")]
		private static var iconSuccess:Class;
		
		
		public static function info(message:String, closehandler:Function=null):void{
			show(message, "Información", Alert.OK, null, closehandler, iconInfo);
		}
		
		public static function error(message:String, closehandler:Function=null):void{
			show(message, "Error", Alert.OK, null, closehandler, iconError);
		}
		
		public static function confirm(message:String, closehandler:Function=null):void{
			show(message, "Confirmación", Alert.YES | Alert.NO, null, closehandler, iconConfirm);
		}

		public static function warning(message:String, closehandler:Function=null):void{
			show(message, "Precaución", Alert.OK, null, closehandler, iconWarning);
		}

		public static function success(message:String, closehandler:Function=null):void{
			show(message, "Exito", Alert.OK, null, closehandler, iconSuccess);
		}


	}
}